<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/
..\FrameXML\UI.xsd">

	<Frame name="EasyMail_MainFrame" hidden="false" parent="UIParent">
		<Scripts>
			<OnLoad>
				EasyMail.OnLoad(self);
			</OnLoad>
			<OnEvent>
				EasyMail.OnEvent(self, event, ...);
			</OnEvent>
			<OnUpdate>
				EasyMail.OnUpdate(self, elapsed);
			</OnUpdate>
		</Scripts>
	</Frame>

	<Button name="EasyMail_ForwardButton" inherits="UIPanelButtonTemplate" parent="OpenMailFrame" text="EASYMAIL_FORWARDTEXT">
		<Size>
			<AbsDimension x="82" y="22"/>
		</Size>
		<Anchors>
			<Anchor point="RIGHT" relativeTo="OpenMailReplyButton" relativePoint="LEFT">
				<Offset>
					<AbsDimension x="0" y="0"/>
				</Offset>
			</Anchor>
		</Anchors>
		<Scripts>
			<OnClick>
				EasyMail.Forward();
			</OnClick>
		</Scripts>
	</Button>

	<CheckButton name="EasyMail_CheckButtonTemplate" virtual="true" inherits="OptionsCheckButtonTemplate">
		<Size>
			<AbsDimension x="27" y="27"/>
		</Size>
		<HitRectInsets>
			<AbsInset left="0" right="0" top="0" bottom="0"/>
		</HitRectInsets>
		<Scripts>
			<OnMouseUp>
				EasyMail.CheckButtonOnMouseUp(self);
			</OnMouseUp>
		</Scripts>
	</CheckButton>

	<Button name="EasyMail_CheckHandlerTemplate" virtual="true">
		<Size>
			<AbsDimension x="34" y="34"/>
		</Size>
		<Scripts>
			<OnLoad>
				self:Disable();
			</OnLoad>
			<OnLeave function="GameTooltip_Hide"/>
		</Scripts>
		<HighlightTexture File="Interface\AddOns\EasyMail\Images\ButtonHilite.tga" alphaMode="ADD">
			<TexCoords left="0" right="0.53125" top="0" bottom="0.53125"/>
		</HighlightTexture>
	</Button>

	<Button name="EasyMail_CheckAllButton" inherits="EasyMail_CheckHandlerTemplate" parent="InboxFrame">
		<Anchors>
			<Anchor point="TOPLEFT">
				<Offset>
					<AbsDimension x="62" y="-23"/>
				</Offset>
			</Anchor>
		</Anchors>
		<Scripts>
			<OnClick>
				EasyMail.CheckAll(true);
			</OnClick>
			<OnEnter>
				GameTooltip:SetOwner(self, "ANCHOR_TOPLEFT");
				GameTooltip:SetText(EASYMAIL_CHECKALLHELPMSG, nil, nil, nil, nil, 1);
			</OnEnter>
		</Scripts>
		<NormalTexture File="Interface\AddOns\EasyMail\Images\CheckAll.tga">
			<TexCoords left="0" right="0.53125" top="0" bottom="0.53125"/>
		</NormalTexture>
		<PushedTexture File="Interface\AddOns\EasyMail\Images\CheckAllDown.tga">
			<TexCoords left="0" right="0.53125" top="0" bottom="0.53125"/>
		</PushedTexture>
		<DisabledTexture File="Interface\AddOns\EasyMail\Images\CheckAllDisabled.tga">
			<TexCoords left="0" right="0.53125" top="0" bottom="0.53125"/>
		</DisabledTexture>
	</Button>

	<Button name="EasyMail_ClearAllButton" inherits="EasyMail_CheckHandlerTemplate" parent="InboxFrame">
		<Anchors>
			<Anchor point="TOPLEFT" relativeTo="EasyMail_CheckAllButton" relativePoint="TOPRIGHT">
				<Offset>
					<AbsDimension x="0" y="0"/>
				</Offset>
			</Anchor>
		</Anchors>
		<Scripts>
			<OnClick>
				EasyMail.CheckAll(false);
			</OnClick>
			<OnEnter>
				GameTooltip:SetOwner(self, "ANCHOR_TOPLEFT");
				GameTooltip:SetText(EASYMAIL_CLEARALLHELPMSG, nil, nil, nil, nil, 1);
			</OnEnter>
		</Scripts>
		<NormalTexture File="Interface\AddOns\EasyMail\Images\ClearAll.tga">
			<TexCoords left="0" right="0.53125" top="0" bottom="0.53125"/>
		</NormalTexture>
		<PushedTexture File="Interface\AddOns\EasyMail\Images\ClearAllDown.tga">
			<TexCoords left="0" right="0.53125" top="0" bottom="0.53125"/>
		</PushedTexture>
		<DisabledTexture File="Interface\AddOns\EasyMail\Images\ClearAllDisabled.tga">
			<TexCoords left="0" right="0.53125" top="0" bottom="0.53125"/>
		</DisabledTexture>
	</Button>

	<Button name="EasyMail_CheckPageButton" inherits="EasyMail_CheckHandlerTemplate" parent="InboxFrame">
		<Anchors>
			<Anchor point="TOPLEFT" relativeTo="EasyMail_ClearAllButton" relativePoint="TOPRIGHT">
				<Offset>
					<AbsDimension x="7" y="0"/>
				</Offset>
			</Anchor>
		</Anchors>
		<Scripts>
			<OnClick>
				EasyMail.CheckPage(true);
			</OnClick>
			<OnEnter>
				GameTooltip:SetOwner(self, "ANCHOR_TOPLEFT");
				GameTooltip:SetText(EASYMAIL_CHECKPAGEHELPMSG, nil, nil, nil, nil, 1);
			</OnEnter>
		</Scripts>
		<NormalTexture File="Interface\AddOns\EasyMail\Images\CheckPage.tga">
			<TexCoords left="0" right="0.53125" top="0" bottom="0.53125"/>
		</NormalTexture>
		<PushedTexture File="Interface\AddOns\EasyMail\Images\CheckPageDown.tga">
			<TexCoords left="0" right="0.53125" top="0" bottom="0.53125"/>
		</PushedTexture>
		<DisabledTexture File="Interface\AddOns\EasyMail\Images\CheckPageDisabled.tga">
			<TexCoords left="0" right="0.53125" top="0" bottom="0.53125"/>
		</DisabledTexture>
	</Button>

	<Button name="EasyMail_ClearPageButton" inherits="EasyMail_CheckHandlerTemplate" parent="InboxFrame">
		<Anchors>
			<Anchor point="TOPLEFT" relativeTo="EasyMail_CheckPageButton" relativePoint="TOPRIGHT">
				<Offset>
					<AbsDimension x="0" y="0"/>
				</Offset>
			</Anchor>
		</Anchors>
		<Scripts>
			<OnClick>
				EasyMail.CheckPage(false);
			</OnClick>
			<OnEnter>
				GameTooltip:SetOwner(self, "ANCHOR_TOPLEFT");
				GameTooltip:SetText(EASYMAIL_CLEARPAGEHELPMSG, nil, nil, nil, nil, 1);
			</OnEnter>
		</Scripts>
		<NormalTexture File="Interface\AddOns\EasyMail\Images\ClearPage.tga">
			<TexCoords left="0" right="0.53125" top="0" bottom="0.53125"/>
		</NormalTexture>
		<PushedTexture File="Interface\AddOns\EasyMail\Images\ClearPageDown.tga">
			<TexCoords left="0" right="0.53125" top="0" bottom="0.53125"/>
		</PushedTexture>
		<DisabledTexture File="Interface\AddOns\EasyMail\Images\ClearPageDisabled.tga">
			<TexCoords left="0" right="0.53125" top="0" bottom="0.53125"/>
		</DisabledTexture>
	</Button>

	<Button name="EasyMail_GetAllButton" parent="InboxFrame">
		<Size>
			<AbsDimension x="112" y="34"/>
		</Size>
		<Anchors>
			<Anchor point="TOPLEFT" relativeTo="EasyMail_ClearPageButton" relativePoint="TOPRIGHT">
				<Offset>
					<AbsDimension x="7" y="0"/>
				</Offset>
			</Anchor>
		</Anchors>
		<Scripts>
			<OnLoad>
				self:Disable();
			</OnLoad>
			<OnClick>
				EasyMail.GetAll();
			</OnClick>
			<OnEnter>
				GameTooltip:SetOwner(self, "ANCHOR_TOPLEFT");
				GameTooltip:SetText(EASYMAIL_GETALLHELPMSG, nil, nil, nil, nil, 1);
			</OnEnter>
			<OnLeave function="GameTooltip_Hide"/>
		</Scripts>
		<NormalTexture File="Interface\AddOns\EasyMail\Images\GetChecked.tga">
			<TexCoords left="0" right="0.890625" top="0" bottom="0.53125"/>
		</NormalTexture>
		<PushedTexture File="Interface\AddOns\EasyMail\Images\GetCheckedDown.tga">
			<TexCoords left="0" right="0.890625" top="0" bottom="0.53125"/>
		</PushedTexture>
		<DisabledTexture File="Interface\AddOns\EasyMail\Images\GetCheckedDisabled.tga">
			<TexCoords left="0" right="0.890625" top="0" bottom="0.53125"/>
		</DisabledTexture>
		<HighlightTexture File="Interface\AddOns\EasyMail\Images\GetCheckedHilite.tga" alphaMode="ADD">
			<TexCoords left="0" right="0.890625" top="0" bottom="0.53125"/>
		</HighlightTexture>
	</Button>

	<Button name="EasyMail_AttButton" inherits="UIPanelButtonTemplate" text="EASYMAIL_ATTBUTTONTEXT">
		<Size>
			<AbsDimension x="125" y="22"/>
		</Size>
		<Scripts>
			<OnClick>
				PlaySound("igMainMenuOptionCheckBoxOn");
				EasyMail.MailAtt(InboxFrame.openMailID);
			</OnClick>
		</Scripts>
	</Button>

	<Button name="EasyMail_MailButton" parent="SendMailNameEditBox">
		<Size>
			<AbsDimension x="24" y="24"/>
		</Size>
		<Anchors>
			<Anchor point="TOPLEFT" relativePoint="TOPRIGHT">
				<Offset>
					<AbsDimension x="-4" y="2"/>
				</Offset>
			</Anchor>
		</Anchors>
		<NormalTexture name="$parentNormalTexture" file="Interface\ChatFrame\UI-ChatIcon-ScrollDown-Up">
			<Size>
				<AbsDimension x="24" y="24"/>
			</Size>
			<Anchors>
				<Anchor point="RIGHT"/>
			</Anchors>
		</NormalTexture>
		<PushedTexture name="$parentPushedTexture" file="Interface\ChatFrame\UI-ChatIcon-ScrollDown-Down">
			<Size>
				<AbsDimension x="24" y="24"/>
			</Size>
			<Anchors>
				<Anchor point="RIGHT"/>
			</Anchors>
		</PushedTexture>
		<DisabledTexture name="$parentDisabledTexture" file="Interface\ChatFrame\UI-ChatIcon-ScrollDown-Disabled">
			<Size>
				<AbsDimension x="24" y="24"/>
			</Size>
			<Anchors>
				<Anchor point="RIGHT"/>
			</Anchors>
		</DisabledTexture>
		<HighlightTexture name="$parentHighlightTexture" file="Interface\Buttons\UI-Common-MouseHilight" alphaMode="ADD">
			<Size>
				<AbsDimension x="24" y="24"/>
			</Size>
			<Anchors>
				<Anchor point="RIGHT"/>
			</Anchors>
		</HighlightTexture>
		<Scripts>
			<OnClick>
				EasyMail.OnClick();
			</OnClick>
		</Scripts>
	</Button>

	<Button name="EasyMailInvisibleButtonTemplate" virtual="true">
		<Scripts>
			<OnEnter>
				EasyMail.StopCounting();
			</OnEnter>
			<OnLeave>
				EasyMail.StartCounting();
			</OnLeave>
		</Scripts>
	</Button>

	<Button name="EasyMailDropdownButtonTemplate" virtual="true">
		<Size x="100" y="16"/>
		<Layers>
			<Layer level="BACKGROUND">
				<Texture name="$parentHighlight" file="Interface\QuestFrame\UI-QuestTitleHighlight" alphaMode="ADD" setAllPoints="true" hidden="true"/>
			</Layer>
		</Layers>
		<Frames>
			<Button name="$parentInvisibleButton" inherits="EasyMailInvisibleButtonTemplate" setAllPoints="true" hidden="true" />
		</Frames>
		<ButtonText name="$parentNormalText">
			<Anchors>
				<Anchor point="LEFT">
					<Offset x="3" y="0"/>
				</Anchor>
			</Anchors>
		</ButtonText>
		<NormalFont style="GameFontHighlightSmallLeft"/>
		<HighlightFont style="GameFontHighlightSmallLeft"/>
		<DisabledFont style="GameFontDisableSmallLeft"/>
		<Scripts>
			<OnLoad>
				self:RegisterForClicks("LeftButtonUp", "RightButtonUp");
			</OnLoad>
			<OnClick>
				EasyMail.DropdownButtonOnClick(self, button);
			</OnClick>
			<OnEnter>
				EasyMail.StopCounting();
				_G[self:GetName().."Highlight"]:Show();
			</OnEnter>
			<OnLeave>
				EasyMail.StartCounting();
				_G[self:GetName().."Highlight"]:Hide();
			</OnLeave>
		</Scripts>
	</Button>

	<Button name="EasyMail_MailDropdown" parent="SendMailFrame" toplevel="true" frameStrata="FULLSCREEN_DIALOG" hidden="true">
		<Size>
			<AbsDimension x="200" y="200"/>
		</Size>
		<Anchors>
			<Anchor point="TOPLEFT" relativeTo="SendMailNameEditBox" relativePoint="BOTTOMLEFT"/>
		</Anchors>
		<Frames>
			<Frame name="$parentBackdrop" setAllPoints="true">
				<Backdrop bgFile="Interface\DialogFrame\UI-DialogBox-Background" edgeFile="Interface\DialogFrame\UI-DialogBox-Border" tile="true">
					<BackgroundInsets>
						<AbsInset left="11" right="12" top="12" bottom="11"/>
					</BackgroundInsets>
					<TileSize>
						<AbsValue val="32"/>
					</TileSize>
					<EdgeSize>
						<AbsValue val="32"/>
					</EdgeSize>
				</Backdrop>
			</Frame>
			<Button name="$parentButton1" inherits="EasyMailDropdownButtonTemplate">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="EasyMail_MailDropdown" relativePoint="TOPLEFT">
						<Offset>
							<AbsDimension x="12" y="-14"/>
						</Offset>
					</Anchor>
				</Anchors>
			</Button>
			<Button name="$parentButton2" inherits="EasyMailDropdownButtonTemplate">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentButton1" relativePoint="BOTTOMLEFT"/>
				</Anchors>
			</Button>
			<Button name="$parentButton3" inherits="EasyMailDropdownButtonTemplate">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentButton2" relativePoint="BOTTOMLEFT"/>
				</Anchors>
			</Button>
			<Button name="$parentButton4" inherits="EasyMailDropdownButtonTemplate">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentButton3" relativePoint="BOTTOMLEFT"/>
				</Anchors>
			</Button>
			<Button name="$parentButton5" inherits="EasyMailDropdownButtonTemplate">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentButton4" relativePoint="BOTTOMLEFT"/>
				</Anchors>
			</Button>
			<Button name="$parentButton6" inherits="EasyMailDropdownButtonTemplate">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentButton5" relativePoint="BOTTOMLEFT"/>
				</Anchors>
			</Button>
			<Button name="$parentButton7" inherits="EasyMailDropdownButtonTemplate">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentButton6" relativePoint="BOTTOMLEFT"/>
				</Anchors>
			</Button>
			<Button name="$parentButton8" inherits="EasyMailDropdownButtonTemplate">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentButton7" relativePoint="BOTTOMLEFT"/>
				</Anchors>
			</Button>
			<Button name="$parentButton9" inherits="EasyMailDropdownButtonTemplate">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentButton8" relativePoint="BOTTOMLEFT"/>
				</Anchors>
			</Button>
			<Button name="$parentButton10" inherits="EasyMailDropdownButtonTemplate">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentButton9" relativePoint="BOTTOMLEFT"/>
				</Anchors>
			</Button>
			<Button name="$parentButton11" inherits="EasyMailDropdownButtonTemplate">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentButton10" relativePoint="BOTTOMLEFT"/>
				</Anchors>
			</Button>
			<Button name="$parentButton12" inherits="EasyMailDropdownButtonTemplate">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentButton11" relativePoint="BOTTOMLEFT"/>
				</Anchors>
			</Button>
			<Button name="$parentButton13" inherits="EasyMailDropdownButtonTemplate">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentButton12" relativePoint="BOTTOMLEFT"/>
				</Anchors>
			</Button>
			<Button name="$parentButton14" inherits="EasyMailDropdownButtonTemplate">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentButton13" relativePoint="BOTTOMLEFT"/>
				</Anchors>
			</Button>
			<Button name="$parentButton15" inherits="EasyMailDropdownButtonTemplate">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentButton14" relativePoint="BOTTOMLEFT"/>
				</Anchors>
			</Button>
		</Frames>
		<Scripts>
			<OnShow>
				EasyMail.DropdownOnShow(self);
			</OnShow>
		</Scripts>
	</Button>

	<ScrollFrame name="EasyMailDropdownScrollFrame" inherits="FauxScrollFrameTemplate" hidden="true">
		<Size>
			<AbsDimension x="20" y="249"/>
		</Size>
		<Scripts>
			<OnVerticalScroll>
				FauxScrollFrame_OnVerticalScroll(self, offset, EasyMail.ButtonHeight, EasyMail.DropdownUpdate)
			</OnVerticalScroll>
		</Scripts>
	</ScrollFrame>

</Ui>

